/**
 */


#ifndef LINUX_FB_H
#define LINUX_FB_H

//-----------------ubuntu定义----------------------------
typedef struct {
  uint8_t b;
  uint8_t g;
  uint8_t r;
  uint8_t a;
} XuiColor;

typedef unsigned int  			A_RGB;		// <= RGB_CURR
#define	RGB_CURR(r,g,b)		(0xFF000000|((r)*0x10000)|((g)*0x100)|(b))		//(u32)(XuiColor)(b,g,r,0xff))
#define RGB565_CLEAR			0x00000000		// Transparent color


typedef union {
  A_RGB		argb;
  XuiColor	color;
}GuiColor;

//===========================================================================================
typedef struct gr_surface {
    int width;
    int height;
    int row_bytes;
    int pixel_bytes;
    unsigned char* data;
} GRSurface;
typedef GRSurface* gr_surface;
//================================================================================================
extern int open_screen(const char* filename);
extern void close_screen(void);
extern void fb_ui_point(int x,int y,A_RGB Inrgb);
extern void fb_ui_vline(int x, int y, int h, A_RGB argb);
extern void fb_ui_hline(int x, int y, int w, A_RGB argb);
extern void fb_ui_line(int xs, int ys, int xe, int ye, A_RGB argb);
extern void fb_ui_circle(signed short x, signed short y, signed short r, A_RGB argb);
extern void fb_ui_fill_circle(signed short x, signed short y, signed short r,signed short ar,A_RGB argb);
extern void fb_ui_fill_rect(int x, int y, int w, int h,A_RGB argb); 
extern void fb_ui_set_rect(int x, int y, int w, int h,A_RGB* pArgb);
extern void fb_ui_get_rect(int x, int y, int w, int h,A_RGB* pArgb);
extern void fb_ui_xor_rect(int x, int y, int w, int h,A_RGB* pArgb);


#endif /*LINUX_FB_H*/
